<?php

namespace LRP\Contract;

/**
 * Interface RegisterInterface
 *
 * PHP Version > 7.0
 *
 * @package LRP\Contract
 * @author  Jon
 * @link    https://gitee.com/joncc/long-running-processor
 */
interface RegisterInterface
{
    /**
     * @param array $handles
     */
    public static function register(array $handles): void;

    /**
     * @param string $tube
     * @param int $num
     * @return bool
     */
    public static function setTubeLineNum(string $tube, int $num): bool;

    /**
     * @param string $tube
     * @return int
     */
    public static function getTubeLineNum(string $tube): int;

    /**
     * @param string $tube
     * @return string
     */
    public static function getHandle(string $tube): string;
}